Fix public-only coverage for excluded re-export origins#4048
Open
WilliamK112 wants to merge 1 commit into
Open
Fix public-only coverage for excluded re-export origins#4048WilliamK112 wants to merge 1 commit into
WilliamK112 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
coverage check --public-onlyeven when the origin file is matched by--project-excludes__init__.pymay be loaded as__unknown__Closes #4034.
Duplicate/ownership checks:
pyrefly coverage check --public-only:--project-excludesshouldn't exclude public re-exports #4034 is open and unassignedgh search prsforpyrefly coverage check --public-only:--project-excludesshouldn't exclude public re-exports #4034 / public re-export / project-excludes / public-only returned no open duplicatesgh pr list --search 4034only returned unrelated Fix: Handle decorated methods from stubs (Type::Callable) in is_method() Fixes #3465 #3597Validation:
cargo +stable-x86_64-pc-windows-gnu test -p pyrefly --lib commands::coverage::collect::tests::test_public_only -- --nocapturecargo +stable-x86_64-pc-windows-gnu test -p pyrefly --lib commands::coverage::collect::tests::test_compute_public_fqns -- --nocapturecargo +stable-x86_64-pc-windows-gnu test -p pyrefly --lib coverage -- --nocapture(65 passed)pyrefly coverage check foo --public-only --project-excludes foo/_something_private.pynow reportsfoo._something_private.barascoverage-partialand exits 1 at 50% coverage instead of reporting100.00% (0 of 0 typable)cargo +stable-x86_64-pc-windows-gnu fmt --all --checkgit diff --checkI also ran
cargo +stable-x86_64-pc-windows-gnu test -p pyrefly --lib; it reached 6185 passed before 5 existing shape_dsl tests hit their internal> 20swatchdog under the full Windows run. Each of those five tests passed when rerun individually.